<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<style>
#main {
  display: flex;
  height: 100%;
}
#graph {
  flex: 0 0 400px;
}
#spanner {
  height: 400px;
}
</style>
<div id="main">
  <svg id="graph" style="background-color: red">
    <rect width="100%" height="0%" fill="green"/>
  </svg>
  <div id="spanner"></div>
</div>
<script>
runAfterLayoutAndPaint(function() {
  document.body.appendChild(document.createElement('div'));
  document.body.offsetLeft;

  var c = document.querySelector('rect');
  c.setAttribute('height', '100%');
  c.getScreenCTM();
}, true);
</script>
